scoreboard players add #guardTowerLoopCount temp 1

particle enchanted_hit

execute positioned ~ ~-1 ~ if entity @n[tag=target,distance=..1] run return run damage @n[tag=target] 0.2 cactus by @s

execute if score #guardTowerLoopCount temp matches 300.. run return run scoreboard players reset #guardTowerLoopCount

execute positioned ^ ^ ^0.6 run function vs:system/game_ctrol/guard_tower/ai/attack/-l/loop